<%= form_tag auth_callback_url(provider: "identity"), class: "form-horizontal" do %>
  <fieldset>
    <legend>Login</legend>

    <% if params[:message].present? %>
    <div class="alert alert-block alert-error">
      <h4><i class="icon-warning-sign"></i> Error</h4>
      <%= params[:message].humanize %>
    </div>
    <% end %>

    <div class="control-group">
      <%= label_tag :auth_key, "Email", class: "control-label" %>
      <div class="controls">
        <div class="input-prepend">
          <span class="add-on"><i class="icon-envelope"></i></span>
          <%= email_field_tag :auth_key, params[:auth_key] %>
        </div>
      </div>
    </div>

    <div class="control-group">
      <%= label_tag :password, "Password", class: "control-label" %>
      <div class="controls">
        <div class="input-prepend">
          <span class="add-on"><i class="icon-lock"></i></span>
          <%= password_field_tag :password %>
        </div>
      </div>
    </div>

    <div class="control-group">
      <div class="controls">
        <%= button_tag type: "submit", class: "btn btn-large btn-primary" do %>
          <i class="icon-ok icon-white"></i> Login
        <% end %>

        or

        <%= link_to signup_url, class: "btn btn-large" do %>
          <i class="icon-user"></i> Signup
        <% end %>
      </div>
    </div>

    <div class="control-group">
      <%= link_to "Forgot Password?", new_password_url %>
    </div>
  </fieldset>
<% end %>
